﻿using System;
using System.Collections.Generic;

public partial class Administration : BasePage
{
    public override SitePage CurrentSitePage
    {
        get { return SitePage.AdminPage; }
    }

    public override List<PageLink> MetaDataList
    {
        get
        {
            return new List<PageLink>
                     {
                         new PageLink(SitePage.Main, "Головна", "Default.aspx"),
                         new PageLink(SitePage.AdminPage, "Офіси", "Administration.aspx", "OfficeList"),
                         new PageLink(SitePage.AdminPage, "Працівники", "Administration.aspx", "UserList"),
                         new PageLink(SitePage.AdminPage, "Консультації", "Administration.aspx", "AdviceList"),
                         new PageLink(SitePage.AdminPage, "Послуги", "Administration.aspx", "ServiceList"),
                         new PageLink(SitePage.AdminPage, "Новини", "Administration.aspx", "ArticleList"),
                         new PageLink(SitePage.AdminPage, "Законодавство", "Administration.aspx", "ArticleGroupList"),
                     };
        }
    }

    public override List<Crumb> Breadcrumbs
    {
        get
        {
            return new List<Crumb>
                   {
                       new Crumb
                       {
                           View = "OfficeList",
                           Title = "Список офісів"
                       },
                       new Crumb
                       {
                           View = "OfficeLocationEdit",
                           ParentView = "OfficeList",
                           Title = "Карта розміщення",
                           Type = eCrumbType.Hidden
                       },
                       new Crumb
                       {
                           View = "UserList",
                           Title = "Список працівників"
                       },
                       new Crumb
                       {
                           View = "ServiceList",
                           Title = "Список послуг"
                       },
                       new Crumb
                       {
                           View = "ServiceEdit",
                           ParentView = "ServiceList",
                           Title = "Редагування послуги",
                           Type = eCrumbType.Text
                       },
                       new Crumb
                       {
                           View = "ArticleList",
                           Title = "Новинний блок"
                       },
                   };
        }
    }

    protected override void OnPreLoadFormContent(EventArgs e)
    {
        base.OnPreLoadFormContent(e);
        CenterPlaceHolder = phContent;
    }

    protected override void Page_Load(object sender, EventArgs e)
    {
        DefaultControl = "OfficeList";
        base.Page_Load(sender, e);
    }

    protected override void OnShowTitle(string message)
    {
        base.OnShowTitle(message);
        controlTitle.SetTitle(message);
    }
}